package com.cqsw.service.impl;

import com.cqsw.entity.Users;
import com.cqsw.mapper.UserMapper;
import com.cqsw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Classname UserServiceImpl
 * @Description TODO
 * @Date 2022/6/13 14:16
 * @Created by Smith.Liu
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public List<Users> getAllUser() {
        return userMapper.getAllUser();
    }

    @Override
    public int insertUser(Users users) {
        return userMapper.insertUser(users);
    }

    @Override
    public int deleteUser(Integer id) {
        return userMapper.deleteUser(id);
    }

    @Override
    public int updateUser(Users user) {
        return userMapper.updateUser(user);
    }

    @Override
    public Users userIdGetForRoleInfo(Integer id) {
        return userMapper.userIdGetForRoleInfo(id);
    }
}
